#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() {
	float sum = 0;
	int flag = 1;
	for (int i = 1; i <= 100; i++) {
		sum += flag* 1.0 / i;
		flag = -flag;
	}
	printf("sum = %f\n", sum);
	return 0;
}